-
-
Notifications
You must be signed in to change notification settings - Fork 59
Update plugin-base and sentry #3127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GermanBluefox
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
# Conflicts: # package-lock.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the plugin infrastructure to version 3.x, specifically updating @iobroker/plugin-base from ~2.0.1 to ~3.0.3 and @iobroker/plugin-sentry from ~2.0.4 to ~3.0.0. The major change is that plugin lifecycle methods (initPlugin, destroy, destroyAll) are now asynchronous and must be properly awaited.
Key changes:
- All plugin lifecycle methods now return Promises and require
await - Import paths changed from
@iobroker/plugin-base/typesto@iobroker/plugin-base - Enhanced shutdown logic in adapter.ts to handle async plugin destruction with race condition prevention
- Type casting adjustments for plugin-base v3 API changes
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types-dev/objects.d.ts | Grammar improvements in JSDoc comments |
| packages/controller/src/main.ts | Added await to plugin lifecycle methods; updated imports; changed Sentry plugin access pattern |
| packages/controller/package.json | Updated plugin-base to ~3.0.3, plugin-sentry to ~3.0.0, debug to ^4.4.3 |
| packages/cli/src/lib/setup/dbConnection.ts | Added await to destroyAll; added type casting for config; updated imports |
| packages/cli/package.json | Updated plugin-base to ~3.0.3, debug to ^4.4.3 |
| packages/adapter/src/lib/adapter/adapter.ts | Refactored terminate() with async shutdown logic; added await to all plugin methods; updated type declarations |
| packages/adapter/package.json | Updated plugin-base to ~3.0.3 |
| package-lock.json | Updated dependencies including Sentry 10.x with OpenTelemetry support |

This PR updates the Plugin-base and Sentry to 3.x including relevant code changes to properly handle the logic on shutdown